package com.builder;

import java.util.ArrayList;
import java.util.List;

//填充器
public class Package implements IMenu{

    List<Matter> matterList = new ArrayList<>();

    @Override
    public IMenu append(Matter matter) {
        matterList.add(matter);
        return this;
    }

    public String getDetail(){
        String str = "";
        for (Matter matter : this.matterList) {
            str = str + matter.type()+" ";
        }
        return str;
    }

}
